package com.kordar.datalist.formatter;

public class IntegerFormatter implements Formatter<Integer> {
    @Override
    public Integer format(Object value, Object... params) {
        if (value == null) {
            return 0;
        }

        if (value.getClass() == String.class) {
            return Integer.parseInt((String) value);
        }
        return (Integer) value;
    }
}
